<template>
    <ul >
      <li  v-for="(user) in users" :key="user.id">{{user.id}}:{{user.name}}</li>
    </ul>
</template>

<script>
import axios from 'axios';
export default {
  name: 'app',
  data() {
    return {
      users : []
    }
  },
  mounted() {
    axios.get('http://localhost:3000/api/users').then(res => {
      this.users = res.data
    })
  },
}
</script>

<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
